document.getElementById('textinput').addEventListener('input', function (e) {
  const textarea = e.target;
  const value = textarea.value;

  const arr = value.split(' ');
  const last = arr[arr.length - 1];

  if (e.inputType!='deleteContentBackward' && last.length === 5 && last.charAt(4)!== ' ') {
    textarea.value = value + ' ';
    console.log('自动添加空格');

    textarea.selectionStart = textarea.selectionEnd = textarea.value.length;
  }

});
  

  var _a =document.getElementById('player3');
  _a.style.width = '400px';
  _a.parentNode.style.width = '400px';